/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package dameki.output;

import dameki.core.GlobalVars;
import dameki.game.GameMove;
import dameki.game.Stone;
import java.awt.AWTException;
import java.awt.Robot;
import java.io.IOException;
import java.util.logging.Level;
import java.util.logging.Logger;

/**
 *
 * @author martnath
 */
public class ConsoleGUI implements IGUI {

    @Override
    public void update(Stone[][] field) {
        for (int x = 7; x >= 0; x--) {
            String s = "";
            for (int y = 0; y < 8; y++) {
                if (field[x][y] == null) {
                    s += "|-|";
                } else if (field[x][y].getColor()==GlobalVars.COLOR_W) {
                    if (field[x][y].IsDame()) {
                        s += "|W|";
                    } else {
                        s += "|w|";
                    }
                } else {
                    if (field[x][y].IsDame()) {
                        s += "|B|";
                    } else {
                        s += "|b|";
                    }
                }
            }
            System.out.println(s);
        }
        System.out.println();
    }

    @Override
    public void animate(GameMove[] move) {}
}
